$.ajaxPrefilter(function (config) {
    config.url = 'http://localhost:8080/api/v1' + config.url

    config.headers = {
        Authorization: localStorage.getItem('token')
    }

    let loadIndex

    config.beforeSend = function () {
        loadIndex = layer.load()
    }
    config.complete = function () {
        layer.close(loadIndex)
    }
})